package org.example.erp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.erp.domain.Sales;
import org.example.erp.domain.SysUser;
import org.example.erp.mapper.SysUserMapper;
import org.example.erp.service.SalesService;
import org.example.erp.mapper.SalesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author dell
 * @description 针对表【sales】的数据库操作Service实现
 * @createDate 2024-10-28 15:43:27
 */
@Service
public class SalesServiceImpl extends ServiceImpl<SalesMapper, Sales>
        implements SalesService {
    @Autowired
    private SalesMapper  baseMapper;

//    public IPage<Sales> findSalesOutbound( Integer currentPage, Integer pageSize,
//                                    String salesCodes,
//                                    String salesCode,
//                                    String status,String customerName,
//                                    String salesDate
//                                    ) {
//        Page<Sales> page = new Page<>(currentPage, pageSize);
//        return baseMapper.findSalesOutbound(page, salesCodes, salesCode, status,customerName, salesDate) ;
//    }

//    public IPage<Sales> findSalesOutbound( Integer currentPage, Integer pageSize,String salesCode){
//        Page<Sales> page = new Page<>(currentPage, pageSize);
//        return baseMapper.findSalesOutbound(page, salesCode) ;
//    }

    public IPage<Sales> findSales(Integer currentPage, Integer pageSize,String salesCodes, String salesCode,String status,String customerName,
String salesDate){
        Page<Sales> page = new Page<>(currentPage, pageSize);
        return baseMapper.findSales(page,salesCodes, salesCode, status,customerName, salesDate);
    }
}




